<?

// v 0.47

// set your time zone - http://us.php.net/manual/en/timezones.php
date_default_timezone_set( 'America/Los_Angeles' );				

// you want it?				
mb_internal_encoding( 'UTF-8' );													
mb_http_output( 'UTF-8' );		

// a few constants for you 

// ROOT
// default /path/to/phpchurro/
// absolute server path to config dir, mvc dirs	
$root_dir = dirname( __FILE__);
if( substr($root_dir, -1) != '/' ) $root_dir .= '/';		
define( 'ROOT', $root_dir );		
set_include_path( ROOT );

// PUBLICROOT
// default /path/to/phpchurro/public 
// absolute server path to web accesable dir - no trailing slash
define( 'PUBLICROOT', dirname($_SERVER['SCRIPT_FILENAME']) );						

// HTTPROOT
// default http://127.0.0.1/phpchurro/public/
// absolute url to base
$http_dir = 'http://'.$_SERVER['SERVER_NAME'].dirname( $_SERVER['SCRIPT_NAME'] );
if( substr($http_dir, -1) != '/' ) $http_dir .= '/';
define( 'HTTPROOT', $http_dir );

// DBUG_LOG_FILESIZE
// error log max filesize
// DBUG_LOG_PATH
// absolute url to log dir
define( 'DBUG_LOG_FILESIZE', 524288 );
define( 'DBUG_LOG_PATH', ROOT.'log/' );

if( !file_exists(PUBLICROOT.'/dev.txt') ){
	//we are on prod
	define( 'ISDEV' , FALSE );
	
	define( 'DBHOST', 'localhost' );
	define( 'DBNAME', 'phpchurro' );
	define( 'DBUSER', '' );
	define( 'DBPASS', '' );
	define( 'THEME', 'default' );
	
	define( 'SITENAME', 'PHP Churro' );
	define( 'EMAILS', '@phpchurro.org' );
	define( 'VERSION', '1234567890' );
} else {
	//we are on dev
	define( 'ISDEV' , TRUE );
	
	define( 'DBHOST', 'localhost' );
	define( 'DBNAME', 'phpchurro' );
	define( 'DBUSER', 'root' );
	define( 'DBPASS', 'root' );
	define( 'THEME', 'default' );
	
	define( 'SITENAME', 'PHP Churro DEV' );
	define( 'EMAILS', '@phpchurro.org' );
	define( 'VERSION', time() );
}

// end of file
// config.php